
<div>
    <div class="">
        <p class="top-tips aui-text-center"><img src="../../../global/image/red-light.png"/>内容越丰富，看的人越多赚的越多哦~</p>
        <p id="top-ro-subject" class="aui-hide" tapmode onclick="ed1_onEditSubject(this);"></p>
    </div>

    <div id="original-content-frame">
        <div id="original-select-media-top" class="aui-list"></div>

        <div id="original-content" class="aui-list aui-form-list">
            <!-- 描述/media/正文，插入在此div中 -->
            <div id="original-content-inner"></div>

            <div id="original-main-text"></div>
        </div>

        <div id="original-select-media-bottom" class="aui-list"></div>
    </div>

    <div id="subject-frame" class="aui-hide">
        <p class="aui-text-center">填写完标题就能发布啦！看的人更多哦(至少2个字)</p>
        <textarea id="subject" class="content" onblur="ed1_onSubjectBlur(this);" tapmode autofocus oninput="ed1_onInputSubject(this);" placeholder="输入标题..."></textarea>
    </div>
</div>

<script id="tpl-ed1-select-media" type="text/x-dot-template">
    <div class="aui-list-item-center">
        <div class="select-media-frame aui-list-item-inner">
            <div class="select-media-inner" tapmode onclick="ed1_onSelectMedia(this);">
                <img class="select-media" src="../../../global/image/camera.png" />
                <p>添加图片或视频</p>
            </div>
        </div>
    </div>
</script>

<script id="tpl-ed1-main-text" type="text/x-dot-template">
    <!-- 此处给 -1，是为了在形式上跟正文保持一致，以简化草稿流程代码 -->
    <div data-idx="-1" class="aui-list-item">
        <div data-content="main-text" class="aui-list-item-inner">
            <div class="aui-list-item-input">
                <textarea class="content" onfocus="ed1_onMainFocus(this);" onblur="ed1_onMainBlur(this);" tapmode oninput="ed1_onMainInput(this);" placeholder=""></textarea>
            </div>
        </div>
    </div>
</script>

<script id="tpl-ed1-media-desc" type="text/x-dot-template">
    
        <div data-idx="{{=it.idx}}" class="aui-list-item">
            <div data-content="media-desc" class="aui-list-item-inner">
    			<div class="delete-btn" tapmode onclick="ed1_onDelete(this);"><i></i></div>
                <div class="aui-list-item-input">
                    <textarea class="content" tapmode oninput="ed1_onInputMediaDesc(this);" placeholder="{{=it.ph}}"></textarea>
                </div>
            </div>
        </div>

</script>

<script id="tpl-ed1-media-group" type="text/x-dot-template">
    <div data-idx="{{=it.idx}}" class="media-group">
        
            <div data-idx="{{=it.idx}}" class="aui-list-item">
                <div data-content="media-desc" class="aui-list-item-inner">
        			<div class="delete-btn" tapmode onclick="ed1_onDelete(this);"><i></i></div>
                    <div class="aui-list-item-input">
                        <textarea class="content" tapmode oninput="ed1_onInputMediaDesc(this);" placeholder="{{=it.ph}}"></textarea>
                    </div>
                </div>
            </div>


        <div data-idx="{{=it.idx}}" class="aui-list-item auix-adjust">
            <div data-content="media" class="aui-list-item-inner">
    			<div class="delete-btn" tapmode onclick="ed1_onDelete(this);"><i></i></div>
                {{? it.bImg }}
                    <!-- 图片: 发布时才上传到七牛，故此处的url为本地路径 -->
                    <img data-media="{{=it.mediaType}}" data-url="{{=it.url}}" src="{{=it.viewUrl}}" tapmode onclick="ed1_browseImages(this);" />
                {{??}}
                    <!-- 视频: 已率先上传到七牛(因为我们在本地不能获取缩率图)，故url为远端地址，path为本地路径 -->
                    <div class="video-frame">
                        <img data-media="{{=it.mediaType}}" data-path="{{=it.path}}" data-url="{{=it.url}}" src="{{=it.viewUrl}}" />
                        <i class="time">{{=ms2VTime(it.duration)}}</i>
                        <div class="play-video" tapmode onclick="ed1_playVideo(this);"><div class="op-btn"></div></div>
                    </div>
                {{?}}
            </div>
        </div>
        <div data-idx="{{=it.idx}}" class="aui-list-item">
            <div data-content="media-body" class="aui-list-item-inner">
    			<div class="delete-btn" tapmode onclick="ed1_onDelete(this);"><i></i></div>
                <div class="aui-list-item-input">
                    <textarea class="content" tapmode oninput="ed1_onInputMediaBody(this);" placeholder="您还可以输入正文"></textarea>
                </div>
            </div>
        </div>
    </div>
</script>
